import { defineStore } from 'pinia';


export const useLayoutStore = defineStore({
  id: 'layout',
  state: () => ({
    collapsed: false,
  }),
  getters: {
    // 菜单栏开关状态
    getCollapsed(state) {
      return state.collapsed;
    },
  },
  actions: {
    // 更新状态
    setCollapsed(data) {
      this.collapsed = data;
    },
  },
  //持久化储存
  persist: true
})